package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.BaseCompany;
import com.ruoyi.system.mapper.BaseCompanyMapper;
import com.ruoyi.system.service.IBaseCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 单位基础Service业务层处理
 *
 * @author ruoyi
 * @date 2022-10-09
 */
@Service
public class BaseCompanyServiceImpl implements IBaseCompanyService
{
    @Autowired
    private BaseCompanyMapper baseCompanyMapper;

    /**
     * 查询单位基础
     *
     * @param id 单位基础主键
     * @return 单位基础
     */
    @Override
    public BaseCompany selectBaseCompanyById(Long id)
    {
        return baseCompanyMapper.selectBaseCompanyById(id);
    }

    /**
     * 查询单位基础列表
     *
     * @param baseCompany 单位基础
     * @return 单位基础
     */
    @Override
    public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany)
    {
        return baseCompanyMapper.selectBaseCompanyList(baseCompany);
    }

    /**
     * 新增单位基础
     *
     * @param baseCompany 单位基础
     * @return 结果
     */
    @Override
    public int insertBaseCompany(BaseCompany baseCompany)
    {
        return baseCompanyMapper.insertBaseCompany(baseCompany);
    }

    /**
     * 修改单位基础
     *
     * @param baseCompany 单位基础
     * @return 结果
     */
    @Override
    public int updateBaseCompany(BaseCompany baseCompany)
    {
        return baseCompanyMapper.updateBaseCompany(baseCompany);
    }

    /**
     * 批量删除单位基础
     *
     * @param ids 需要删除的单位基础主键
     * @return 结果
     */
    @Override
    public int deleteBaseCompanyByIds(Long[] ids)
    {
        return baseCompanyMapper.deleteBaseCompanyByIds(ids);
    }

    /**
     * 删除单位基础信息
     *
     * @param id 单位基础主键
     * @return 结果
     */
    @Override
    public int deleteBaseCompanyById(Long id)
    {
        return baseCompanyMapper.deleteBaseCompanyById(id);
    }
}
